//
//  ARTWatchHisModel.h
//  ChartsDemo
//
//  Created by 刘权 on 2021/10/27.
//

#import <Foundation/Foundation.h>
#import "ARTWathDataModel.h"

NS_ASSUME_NONNULL_BEGIN

@interface ARTWatchHisModel : NSObject

@property (assign, nonatomic)  ARTWatchMonitorType  type;

// 检测日期
@property (strong, nonatomic)  NSString *date;
// 检测时长
@property (assign, nonatomic)  NSInteger  longTime;
// 最大血氧
@property (assign, nonatomic)  NSInteger  spo2Max;
// 最小血氧
@property (assign, nonatomic)  NSInteger  spo2Min;
// 平均血氧
@property (assign, nonatomic)  NSInteger  spo2Avg;
// 最大心率
@property (assign, nonatomic)  NSInteger  prMax;
// 最小心率
@property (assign, nonatomic)  NSInteger  prMin;
// 平均心率
@property (assign, nonatomic)  NSInteger  prAvg;
// 平均心率
@property (assign, nonatomic)  NSInteger  ID;

// 查看状态 0:未知 1:未查看 2:已查看
@property (assign, nonatomic)  NSInteger  lookState;

@property (strong, nonatomic)  NSMutableArray<ARTWathDataModel *> *dataList;
@property (strong, nonatomic)  NSString *dataFileName;

//----------sleep
// >=95
@property (assign, nonatomic)  NSInteger  spo2_max95;
// <85
@property (assign, nonatomic)  NSInteger  spo2_85;
// <90
@property (assign, nonatomic)  NSInteger  spo2_90;
// <95
@property (assign, nonatomic)  NSInteger  spo2_95;

// >100
@property (assign, nonatomic)  NSInteger  pr_100;
// <60
@property (assign, nonatomic)  NSInteger  pr_60;
// <60
//@property (assign, nonatomic)  NSInteger  pr_60;
// 过高
@property (assign, nonatomic)  NSInteger  pr_high;
// 过低
@property (assign, nonatomic)  NSInteger  pr_low;
// 正常
@property (assign, nonatomic)  NSInteger  pr_normal;

//---------------------睡眠报告
// 氧减指数
@property (assign, nonatomic)  CGFloat  odi;
// 低氧比率
@property (assign, nonatomic)  CGFloat  AHI;
// 清醒时长，单位秒
@property (assign, nonatomic)  NSInteger  time_awake;
// 浅睡时长，单位秒
@property (assign, nonatomic)  NSInteger  time_light_sleep;
// 深睡时间，单位秒
@property (assign, nonatomic)  NSInteger  time_deep_sleep;
// 测量开始的时间戳
@property (assign, nonatomic)  NSInteger  time_start;
// 测量结束的时间戳
@property (assign, nonatomic)  NSInteger  time_end;
// 睡眠分期
@property (strong, nonatomic)  NSMutableArray<NSNumber *> *sleepStages;
// 测试结论
@property (assign, nonatomic)  NSInteger  testResult;
// 氧减总次数
@property (assign, nonatomic)  NSInteger  oxygenLowTotal;
// 低氧持续最大时长
@property (assign, nonatomic)  NSInteger  oxygenTimeLow;

- (void)syncStoreData;

- (void)storeSleepSpo2ChartImage:(UIImage *)image;
- (UIImage *)sleepSpo2ChartImage;

- (void)storeSleepPrChartImage:(UIImage *)image;
- (UIImage *)sleepPrChartImage;

- (void)save;

@end

NS_ASSUME_NONNULL_END
